Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
File storage adapter for Keyv, using msgpack to serialize data fast and small.
File storage adapter for Keyv, using json to serialize data fast and small.
File storage adapter for Keyv.
TTL functionality is handled internally by interval scan, don't need to panic about expired data take too much space.
npm install --save keyv keyv-file
const Keyv = require('keyv')
const KeyvFile = require('keyv-file').KeyvFile
const keyv = new Keyv({
store: new KeyvFile()
});
// More options with default value:
const customKeyv = new Keyv({
store: new KeyvFile({
filename: `${os.tmpdir()}/keyv-file/default-rnd-${Math.random().toString(36).slice(2)}.json`, // the file path to store the data
expiredCheckDelay: 24 * 3600 * 1000, // ms, check and remove expired data in each ms
writeDelay: 100, // ms, batch write to disk in a specific duration, enhance write performance.
encode: JSON.stringify, // serialize function
decode: JSON.parse // deserialize function
})
})
import KeyvFile, { makeField } from 'keyv-file'
class Kv extends KeyvFile {
constructor() {
super({
filename: './db.json'
})
}
someField = makeField(this, 'field_key')
}
export const kv = new Kv
kv.someField.get(1) // empty return default value 1
kv.someField.set(2) // set value 2
kv.someField.get() // return saved value 2
kv.someField.delete() // delete field
MIT
FAQs
File storage adapter for Keyv, using msgpack to serialize data fast and small.
The npm package keyv-file receives a total of 23,468 weekly downloads. As such, keyv-file popularity was classified as popular.
We found that keyv-file demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.